<template>
	<!--  :style="{'min-height':height}" -->
  <div id="app">
<!--    头部-->
   <!-- <Header  @changemessage="changemessage"/> -->
   <div class="loading_box" :class="{}" v-if="loadflag"></div>
    <router-view
	 @showloading="showloading"
	 @closeloading="closeloading"
	/>
  </div>
</template>
<script>
import Header from './components/header'
export default {
	data(){
		return {
			height:0,
			loadflag:false
		}
	},
  components:{
    Header
  },

  mounted() {


  },
  methods:{
	  closeloading(){
		  this.loadflag=false
		  console.log('触发')
	  },
	  showloading(){
		  var that=this
		  this.loadflag=true
		  if(arguments[0].methods=="go"){
		  			  		this.$router.go(arguments[0].num)
		  					  // this.$emit("closeloading")

		  			  }else{
		  				  this.$router.push({'path':arguments[0].path,query:arguments[0].query},()=>{
		  					// this.$emit("closeloading")

		  })
		  			  }
		  this.timeNo=setTimeout(()=>{

			  that.closeloading()
		  },3000) },
	changemessage(){
		// console.log(arguments)
	}
  }
}
</script>
<style lang="less">
#app{
	background: #F3F3F5;
	// min-height: 9.99rem;
	min-height:100vh;
}
	.over{

		overflow: hidden;
		text-overflow:ellipsis;
		white-space: nowrap;
	}
	.over2{
		 overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}
	.over3{
		 overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
	}
	.mar_l0{
		margin-left: 0!important;
	}
	.mar_r0{
		margin-right: 0!important;
	}
	.mar_b0{
		margin-bottom: 0!important;
	}
	.loading_box{
		position: absolute;
		top: 0;
		left: 0;
		z-index: 9999;
		width: 100%;
		height: 100%;
		background-image: url(assets/image/home/feiji.gif);
		background-size: 100% 100%;
		background-repeat: no-repeat;
		  // animation-name: loading;
		  // animation-duration: 3s;
	}
	.loading_box_animation_show{

	}
	.disappear{
		display: none;
	}

	@keyframes loading {
	  0% {opacity: 0.7;}
	  100% {opacity: 1;}
	 
	}

</style>
